From 3d5a7f44530c665fd1d2018c795382017539ba1b Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Mon, 24 Apr 2006 13:43:10 +0000 Subject: [PATCH] Fix handling of negative ordinates git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@1948 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/an1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gpsbabel/an1.c b/gpsbabel/an1.c index 17d3418c0..05e980489 100644 --- a/gpsbabel/an1.c +++ b/gpsbabel/an1.c @@ -205,14 +205,14 @@ Skip(FILE * f, static double DecodeOrd( long ord ) { - return (double)(0x80000000-ord)/(0x800000); + return ((double)(long)(0x80000000L-ord))/(0x800000); } static long EncodeOrd( double ord ) { - unsigned long tmp = ord * 0x800000; - return 0x80000000UL-tmp; + long tmp = ord * 0x800000; + return 0x80000000L-tmp; } static int -- 2.30.2